home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume7 / elm_update / part3 < prev    next >
Encoding:
Internet Message Format  |  1986-11-30  |  32.7 KB

  1. Subject:  v07i020:  ELM Update Kit, Part03/03
  2. Newsgroups: mod.sources
  3. Approved: mirror!rs
  4.  
  5. Submitted by: Dave Taylor <taylor@hplabs.HP.COM>
  6. Mod.sources: Volume 7, Issue 20
  7. Archive-name: elm_update/Part03
  8.  
  9. [  The shell scripts in this posting should be run on a clean copy of
  10.    the ELM sources.  Then run the "Configure.sh" script now provided,
  11.    to build the Makefiles, etc.  I suppose this is a good time to say
  12.    that Dave said to ignore errors in unpacking Part 12 of the Volume
  13.    6 ELM distribution.  -- r$  ]
  14.  
  15. #!/bin/sh
  16. # This is a shell archive.  Remove anything before this line,
  17. # then unpack it by saving it in a file and typing "sh file".
  18.  
  19. # Exit status; set to 1 on "wc" errors or if would overwrite.
  20. STATUS=0
  21. # Contents:  Edit3
  22.  
  23. echo x - Edit3
  24. if test -f Edit3 ; then
  25.     echo Edit3 exists, putting output in $$Edit3
  26.     OUT=$$Edit3
  27.     STATUS=1
  28. else
  29.     OUT=Edit3
  30. fi
  31. sed 's/^XX//' > $OUT <<'@//E*O*F Edit3//'
  32. XX: Use /bin/sh
  33.  
  34. XX# This is the automatically generated output of the AUTODIFF program after
  35. XX# being run on the two directories;
  36. XX#    Old Directory: Elm-Posted
  37. XX#    New Directory: Elm
  38.  
  39. XX# Any problems with execution of this script should be reported to the 
  40. XX#     author of the program, Dave Taylor, at "hplabs!taylor".  Thanks
  41.  
  42. XX# first off, let's make sure we're running in SH
  43.  
  44. XXexport PATH || (sh $0; exit $$)
  45.  
  46. XX# next, let's ensure the user has "ed"...
  47.  
  48. XXif [ ! -f /bin/ed ]
  49. XXthen
  50. XX  echo I can\'t find /bin/ed\!
  51. XX  exit 1
  52. XXfi
  53.  
  54. XX# finally, let's get this show on the road!!
  55.  
  56. XX#---------------------------------
  57. XX# File Elm/Configure.sh is new!
  58.  
  59. XXecho File Elm/Configure.sh is new - extracting...
  60. XXif [ -f Configure.sh ]
  61. XXthen
  62. XX  echo File \'Configure.sh\' is new, but you already have something called that\!
  63. XX  echo I\'m going to move your file to \'Configure.sh.old\'...
  64. XX  /bin/mv -f Configure.sh Configure.sh.old
  65. XXelse
  66. XX  echo Extracting new file \'Configure.sh\'
  67. XXfi
  68.  
  69. XXcat > Configure.sh << 'END_OF_FILE'
  70. XX#!/bin/sh
  71. XX#
  72. XX# Configure.sh, a shell script for configuring the Elm mail system for
  73. XX#     your site and desires.  This script uses some ideas ripped out
  74. XX#    of the 'rn' install script.  Thanks Larry!
  75. XX#
  76.  
  77. XXexport PATH || (sh $0 ; kill $$)
  78.  
  79. XXSHELL=/bin/sh
  80.  
  81. XXSED1=/tmp/Elm.sed1
  82. XXSED2=/tmp/Elm.sed2
  83.  
  84. XXif [ -f /bin/rm ]
  85. XXthen
  86. XX  rm=/bin/rm
  87. XXelse
  88. XX  rm=rm
  89. XXfi
  90.  
  91. XX$rm -f $SED1 $SED2
  92. XXtouch $SED1 $SED2
  93. XXchmod 777 $SED1 $SED2
  94.  
  95. XX# first test - is stdin still free for answering questions??
  96. XXif [ ! -t 0 ]
  97. XXthen
  98. XX  echo "Please use 'sh Configure.sh' rather than 'sh < Configure.sh'"
  99. XX  exit 1
  100. XXfi
  101.  
  102. XX# next let's see what sorta echo flag we have here...
  103.  
  104. XXif [ "`echo -n`" = "-n" ]
  105. XXthen
  106. XX  nflag=""
  107. XX  cflag="\\c" 
  108. XXelse
  109. XX  nflag="-n"
  110. XX  cflag=""
  111. XXfi
  112.  
  113. XX# now the intro blurb
  114.  
  115. XXcat << END_OF_INTRO
  116.  
  117. XX                   Elm Configuration Script, v2
  118. XX       
  119. XX      
  120. XX    This is the configuration script for the Elm mail system.  By using
  121. XX    it rather than editing the "hdrs/sysdefs.h" file, it is hoped that
  122. XX    the installation process will be considerably easier.
  123.  
  124. XX    On all questions, the value in [square brackets] is the default that 
  125. XX    will be used if you just press RETURN...
  126.  
  127.  
  128. XXEND_OF_INTRO
  129.  
  130. XXecho "Trying to figure out what sort of OS you're on..."
  131.  
  132. XX# next interesting part - figure out what OS we're on
  133.  
  134. XXos_name=""
  135.  
  136. XX$rm -f .osname
  137. XXtouch .osname
  138.  
  139. XXcat << 'EOF' > .get_osname
  140.  
  141. XXuname
  142.  
  143. XXif [ $? != 0 ] 
  144. XXthen
  145. XX  if [ -f /vmunix ]
  146. XX  then
  147. XX    echo "bsd" > .osname
  148. XX  else
  149. XX    exit 0
  150. XX  fi
  151. XXfi
  152.  
  153. XXif [ "`uname -s`" != "" ]
  154. XXthen
  155. XX   uname -s | tr '[A-Z]' '[a-z]' > .osname
  156. XXfi
  157.  
  158. XXexit 0
  159. XX 
  160. XXEOF
  161.  
  162. XXsh .get_osname > /dev/null 2>&1
  163.  
  164. XXif [ -f .osname ] 
  165. XXthen
  166. XX  os_name="`cat .osname`"
  167. XX  $rm -f .osname
  168. XXfi
  169.  
  170. XX$rm -f .get_osname
  171.  
  172. XXif [ "$os_name" = "" ] 
  173. XXthen
  174. XX  cat << THE_END
  175.  
  176. XXI cannot figure out what sort of operating system you're running here.  Please
  177. XXtype in the NAME of the OS you're running or the name of the machine you're
  178. XXTHE_END
  179.  
  180. XX  echo $nflag "running on.  I'll check the name in a minute : " $cflag
  181.  
  182. XX  read junk morejunk
  183. XX  
  184. XX  os_name=`echo $junk | tr '[A-Z]' '[a-z]'`
  185. XXfi
  186.  
  187. XXOS_FLAG="HUH??"
  188.  
  189. XXwhile [ "$OS_FLAG" = "HUH??" ]
  190. XXdo
  191.  
  192. XX  case $os_name in
  193. XX    hp)        NAME="HP-UX"; OS_FLAG=""        ;;
  194. XX    hp-ux)     NAME="HP-UX"; OS_FLAG="";           ;;
  195. XX    vax)    NAME="BSD"; OS_FLAG="BSD";      ;;
  196. XX    vaxen)    NAME="BSD"; OS_FLAG="BSD";      ;;
  197. XX    bsd)    NAME="BSD"; OS_FLAG="BSD";      ;;
  198. XX    uts)    NAME="UTS"; OS_FLAG="UTS";      ;;
  199. XX    sun)    NAME="Sun BSD"; OS_FLAG="SUN";        ;;
  200. XX    pyramid)    NAME="Pyramid BSD"; OS_FLAG="PYRAMID";    ;;
  201. XX    amdahl)    NAME="UTS"; OS_FLAG="UTS";      ;;
  202. XX    v5)        NAME="System V"; OS_FLAG="";        ;;
  203. XX    v7)        NAME="System VII"; OS_FLAG="";        ;;
  204. XX    eunice)    NAME="Eunice"; OS_FLAG="";        ;;
  205. XX    convergent)    NAME="Convergent BSD"; OS_FLAG="BSD";        ;;
  206. XX    berkeley)    NAME="BSD"; OS_FLAG="BSD";        ;;
  207. XX    ultrix)    cat << THE_END
  208.  
  209. XXI know that this is a breed of Unix, but I don't know what TYPE of OS it
  210. XXis like.  Please enter the NAME of the OS that this is most like (e.g. "BSD")
  211. XXand we'll go from there.
  212.  
  213. XXTHE_END
  214. XX                    ;;
  215. XX    xenix)    cat << THE_END
  216.  
  217. XXYou're outta luck.  Xenix (dumb OS that it is only allows 6 character 
  218. XXidentifier names.  You'll need to go in and LABORIOUSLY translate all the
  219. XXVERY LONG identifier names to the right length.   The correct response to 
  220. XXseeing this message is to call your vendor and get ANGRY!!!!
  221.  
  222. XXMeanwhile, we might as well just quit here.  Sorry.
  223. XXTHE_END
  224. XXexit 1
  225. XX                    ;;
  226. XX    *)        cat << THE_END
  227.  
  228. XXI don't know what OS you're specifying!  The only one's I know of are;
  229.  
  230. XX  HP-UX, BSD, UTS, Eunice, Xenix, Ultrix, V5, and V7
  231.  
  232. XXI also know the machines
  233.  
  234. XX  HP, Amdahl, Sun, Vaxen, Convergent and Pyramid
  235.  
  236. XXIf you're not among this list, you'll need to pick the closest OS name.  
  237. XXTHE_END
  238.  
  239. XX    echo " "
  240. XX    echo $nflag "Please choose again: " $cflag
  241. XX    read os_name
  242. XX    ;;
  243. XX  esac
  244.  
  245. XXdone
  246.  
  247. XXecho " "
  248. XXecho " "
  249. XXecho you\'re on the following version of Unix: $NAME
  250.  
  251. XXcase $OS_FLAG in 
  252. XX  BSD) echo "s/>os-define</-DBSD/" >> $SED2
  253. XX       echo "s/>lib2</-lcurses/" >> $SED2
  254. XX       ;;
  255.  
  256. XX  SUN) echo "s/>os-define</"-DBSD -DSUN"/" >> $SED2
  257. XX       echo "s/>lib2</-lcurses/" >> $SED2
  258. XX       ;;
  259.  
  260. XX  PYRAMID) echo "s/>os-define</"-DBSD -DNO_VAR_ARGS"/" >> $SED2
  261. XX       echo "s/>lib2</-lcurses/" >> $SED2
  262. XX       ;;
  263.  
  264. XX  *)   echo "s/>os-define<//"    >> $SED2
  265. XX       echo "s/>lib2<//"         >> $SED2
  266. XX       ;;
  267.  
  268. XXesac
  269.  
  270. XXecho " "
  271. XXecho "Now we can get down to those questions..."
  272. XXecho " "
  273.  
  274. XXcat << THE_END
  275.  
  276.  
  277. XXDoes your site receive mail with valid "Reply-To:" and "From:" fields in
  278. XXthe messages?  (usually the answer is "no" since not all sites on the network
  279. XXrewrite the addresses, and this'll usually cause the return mail to fail).
  280. XXTHE_END
  281.  
  282. XXanswer="no"
  283. XXecho $nflag "Are the addresses valid (y/n) [no] ?" $cflag
  284. XXread answer
  285.  
  286. XXif [ "$answer" != "y" -a "$answer" != "yes" ]
  287. XXthen
  288. XX  echo \
  289. XX"s/#define USE_EMBEDDED_ADDRESSES/\/** #define USE_EMBEDDED_ADDRESSES **\//" \
  290. XX  >> $SED1
  291. XXfi
  292.  
  293. XXcat << THE_END
  294.  
  295. XX-------------------------------------------------------------------------------
  296.  
  297. XXHow about memory?  If you have a lot, you can enter a fairly large number
  298. XXfor the next few questions...if not, you'll probably want to enter the
  299. XXsuggested small-system values.  (This applies to the speed of the swapping
  300. XXon your system too - if you're on a FAST system, use the big values!)
  301.  
  302. XXFirst, how many messages should be allowed in a single folder?  (the suggested
  303. XXvalues are 1000 for blindly fast systems, 500 for average systems and 100 for
  304. XXTHE_END
  305.  
  306. XXecho $nflag "slow systems).  Number of messages [500] ? " $cflag
  307.  
  308. XXmax_headers=NONE
  309.  
  310. XXwhile [ "$max_headers" = "NONE" ]
  311. XXdo 
  312. XX  read junk
  313.  
  314. XX  if [ "$junk" = "" ]
  315. XX  then
  316. XX    junk=500
  317. XX  fi
  318.  
  319. XX  if [ $junk -gt 1000 -o $junk -lt 50 ] 
  320. XX  then
  321. XX    echo "I think a value of $junk is pretty strange.  You better answer this"
  322. XX    echo "question again..."
  323. XX    echo " "
  324. XX    echo $nflag "How many messages per folder [500] ? " $cflag
  325. XX    read junk
  326. XX  else
  327. XX    max_headers=$junk
  328. XX    echo "s/>500</$max_headers/" >> $SED1
  329. XX  fi
  330. XX 
  331. XX  if [ $junk -lt 200 ]
  332. XX  then
  333. XX    system_size="small"
  334. XX  elif [ $junk -lt 750 ]
  335. XX  then
  336. XX    system_size="normal"
  337. XX  else
  338. XX    system_size="big"
  339. XX  fi
  340. XXdone
  341.  
  342. XXcase $system_size in
  343. XX  small)  default=223;        ;;
  344. XX  normal) default=503;        ;;
  345. XX  big)    default=739;        ;;
  346. XXesac
  347.  
  348. XXecho " "
  349.  
  350. XXmax_saliases="NONE"
  351.  
  352. XXwhile [ "$max_saliases" = "NONE" ] 
  353. XXdo 
  354.  
  355. XX  echo $nflag "Max number of system aliases available [$default] ? " $cflag
  356.  
  357. XX  read junk
  358.  
  359. XX  if [ "$junk" = "" ] 
  360. XX  then
  361. XX    junk=$default
  362. XX  fi
  363.  
  364. XX  if [ $junk -lt 50 -o $junk -gt 1000 ] 
  365. XX  then
  366. XX    echo "Pretty far out value for this question!  I think you should reconsider"
  367. XX    echo "your answer and try this question again..."
  368. XX    echo " "
  369. XX  else
  370. XX    max_saliases=$junk
  371. XX    echo "s/>503</$max_saliases/" >> $SED1
  372. XX  fi
  373. XXdone
  374.  
  375. XXcase $system_size in 
  376. XX  small)     default=127;        ;;
  377. XX  normal)    default=251;        ;;
  378. XX  big)        default=503;        ;;
  379. XXesac
  380.  
  381. XXmax_ualiases="NONE"
  382.  
  383. XXwhile [ "$max_ualiases" = "NONE" ] 
  384. XXdo 
  385.  
  386. XX  echo $nflag "Max number of user aliases available   [$default] ? " $cflag
  387.  
  388. XX  read junk
  389.  
  390. XX  if [ "$junk" = "" ] 
  391. XX  then
  392. XX   junk=$default
  393. XX  fi
  394.  
  395. XX  if [ $junk -lt 50 -o $junk -gt 1000 ] 
  396. XX  then
  397. XX    echo "Pretty far out value for this question!  I think you should reconsider"
  398. XX    echo "your answer and try this question again..."
  399. XX    echo " "
  400. XX  else
  401. XX    max_ualiases=$junk
  402. XX    echo "s/>251</$max_ualiases/" >> $SED1
  403. XX  fi
  404. XXdone
  405.  
  406. XXcase $system_size in 
  407. XX  small)     default=50;        ;;
  408. XX  normal)    default=150;        ;;
  409. XX  big)        default=150;        ;;
  410. XXesac
  411.  
  412. XXmax_in_weedlist="NONE"
  413.  
  414. XXwhile [ "$max_in_weedlist" = "NONE" ] 
  415. XXdo 
  416.  
  417. XX  echo $nflag "Max number of headers in weedout list  [$default] ? " $cflag
  418.  
  419. XX  read junk
  420.  
  421. XX  if [ "$junk" = "" ] 
  422. XX  then
  423. XX    junk=$default
  424. XX  fi
  425.  
  426. XX  if [ $junk -lt 10 -o $junk -gt 200 ] 
  427. XX  then
  428. XX    echo "Pretty strange answer to this question!  I think you should reconsider"
  429. XX    echo "and try this question again..."
  430. XX    echo " "
  431. XX  else
  432. XX    max_in_weedlist=$junk
  433. XX    echo "s/>150</$max_in_weedlist/" >> $SED1
  434. XX  fi
  435. XXdone
  436.  
  437. XXcat << THE_END
  438.  
  439. XXThe next pair of questions have to do with what to do when another program has 
  440. XXlocked a mailbox...
  441.  
  442. XXFirst, how many times should the program check for the removal of the lock
  443. XXTHE_END
  444.  
  445. XXdefault=6
  446.  
  447. XXmax_attempts="NONE"
  448.  
  449. XXwhile [ "$max_attempts" = "NONE" ] 
  450. XXdo 
  451.  
  452. XX  echo $nflag "file before giving up? [6] " $cflag
  453.  
  454. XX  read junk
  455.  
  456. XX  if [ "$junk" = "" ] 
  457. XX  then
  458. XX   junk=$default
  459. XX  fi
  460.  
  461. XX  if [ $junk -lt 3 -o $junk -gt 10 ] 
  462. XX  then
  463. XX    echo \
  464. XX"The recommended range is 3-10   ...Number of times to check lock"
  465. XX  else
  466. XX    max_attempts=$junk
  467. XX    echo "s/>6</$max_attempts/" >> $SED1
  468. XX  fi
  469. XXdone
  470.  
  471. XXecho " "
  472. XXanswer="no"
  473. XXecho $nflag "Should it REMOVE the lockfile after $max_attempts checks [no] ?" \
  474. XX     $cflag
  475. XXread answer
  476.  
  477. XXif [ "$answer" != "y" -a "$answer" != "yes" ]
  478. XXthen
  479. XX  echo \
  480. XX"s/#define REMOVE_AT_LAST/\/** #define REMOVE_AT_LAST **\//" \
  481. XX  >> $SED1
  482. XXfi
  483.  
  484. XXif [ "$NAME" = "BSD" ]
  485. XXthen 
  486. XX  ps="ps -cax"
  487. XXelse
  488. XX  ps="ps -ef"
  489. XXfi
  490.  
  491. XXecho " "
  492. XXecho " "
  493. XXecho "poking about a bit.."
  494.  
  495. XXif [ "`$ps | grep sendmail | grep -v grep`" != "" ]
  496. XXthen
  497. XX  echo "You're running sendmail.  Well done, I guess..."
  498. XX  echo "s/\/\*\* #define DONT_ADD_FROM \*\*\//#define DONT_ADD_FROM/" \
  499. XX    >> $SED1
  500. XX    echo \
  501. XX "s/#define USE_DOMAIN/\/** #define USE_DOMAIN **\//" \
  502. XX    >> $SED1
  503. XXelse
  504.  
  505. XX  cat << THE_END
  506.  
  507. XXSince you're not running sendmail, should I check local user entered addresses
  508. XXTHE_END
  509.  
  510. XXanswer="yes"
  511. XXecho $nflag "against the valid mailboxes on this system [yes] ? " $cflag
  512. XXread answer
  513.  
  514. XXif [ "$answer" != "y" -a "$answer" != "yes" -a "$answer" != "" ]
  515. XXthen
  516. XX  echo \
  517. XX"s/#define NOCHECK_VALIDNAME/\/** #define NOCHECK_VALIDNAME **\//" \
  518. XX  >> $SED1
  519. XXfi
  520.  
  521. XXcat << THE_END
  522.  
  523. XXAre you running a machine where you want to have a domain name appended to the
  524. XXTHE_END
  525.  
  526. XXanswer="yes"
  527. XXecho $nflag "hostname on outbound mail [no] ? " $cflag
  528. XXread answer
  529.  
  530. XXif [ "$answer" != "y" -a "$answer" != "yes" ]
  531. XXthen
  532. XX    echo \
  533. XX "s/#define USE_DOMAIN/\/** #define USE_DOMAIN **\//" \
  534. XX    >> $SED1
  535. XXelse
  536. XX  echo " "
  537. XX  echo $nflag "Enter the domain name (include leading '.') : " $cflag
  538. XX  read answer
  539. XX  echo "s/<enter your domain here>/$answer/" >> $SED1
  540. XXfi
  541.  
  542. XXfi
  543.  
  544. XX# next let's see if we can find the vfork command on this system..
  545.  
  546. XXcat << EOF > .test.c
  547. XXmain()
  548. XX{
  549. XX    (void) vfork();
  550. XX}
  551. XXEOF
  552.  
  553. XXcat << EOF > .vfork
  554. XXcc .test.c
  555. XXEOF
  556.  
  557. XXsh .vfork > .log 2>& 1
  558.  
  559. XXif [ "`wc -l .log`" -eq "0" ]
  560. XXthen
  561. XX  echo "You have virtual memory system calls available.  Cool..."
  562. XXelse
  563. XX  cat << THE_END
  564.  
  565. XXYour machine doesn't seem to have the vfork command available.  Should I assume
  566. XXTHE_END
  567.  
  568. XX  answer="no"
  569. XX  echo $nflag "you have it, anyway [no] ? " $cflag
  570. XX  read answer
  571.  
  572. XXif [ "$answer" != "y" -a "$answer" != "yes" ]
  573. XX  then
  574. XX    echo "s/\/\*\* #define NO_VM \*\*\//#define NO_VM/" >> $SED1
  575. XX  fi
  576. XXfi
  577.  
  578. XX$rm -f a.out .test.c .vfork .log
  579.  
  580. XX# next let's see if we have the gethostname() system call...
  581.  
  582. XXcat << EOF > .test.c
  583. XXmain()
  584. XX{
  585. XX    (void) gethostname();
  586. XX}
  587. XXEOF
  588.  
  589. XXcat << EOF > .hostname
  590. XXcc .test.c
  591. XXEOF
  592.  
  593. XXsh .hostname > .log 2>& 1
  594.  
  595. XXif [ "`wc -l .log`" -eq "0" ]
  596. XXthen
  597. XX  echo "You have the 'gethostname()' system call..."
  598. XXelse
  599. XX  echo "s/\/\*\* #define NEED_GETHOSTNAME \*\*\//#define NEED_GETHOSTNAME/" \
  600. XX  >> $SED1
  601. XXfi
  602.  
  603. XX$rm -f a.out .test.c .hostname .log
  604.  
  605. XX# next let's see if we have long variable names...
  606.  
  607. XXcat << EOF > .test.c
  608. XXmain()
  609. XX{
  610. XX    int this_is_a_long_variable;
  611.  
  612. XX    (void) this_is_a_long_variable_routine_name();
  613. XX    
  614. XX}
  615. XXthis_is_a_long_variable_routine_name() { }
  616. XXEOF
  617.  
  618. XXcat << EOF > .varnames
  619. XXcc .test.c
  620. XXEOF
  621.  
  622. XXsh .varnames > .log 2>& 1
  623.  
  624. XXif [ "`wc -l .log`" -eq "0" ]
  625. XXthen
  626. XX  echo "You have long variable names.  Well done!!!!!"
  627. XXelse
  628. XX  echo "How embarassing.  Your C compiler doesn't support long variables..."
  629. XX  echo "s/\/\*\* #define SHORTNAMES \*\*\//#define SHORTNAMES/" \
  630. XX  >> $SED1
  631. XXfi
  632.  
  633. XX$rm -f a.out .test.c .varname .log
  634.  
  635. XXcat << THE_END
  636.  
  637. XXWhen given a machine that you talk to directly, should the 'pathalias' route to
  638. XXTHE_END
  639.  
  640. XXanswer="no"
  641. XXecho $nflag "the machine be used instead [no] ? " $cflag
  642. XXread answer
  643.  
  644. XXif [ "$answer" != "y" -a "$answer" != "yes" ]
  645. XXthen
  646. XX    echo \
  647. XX "s/#define LOOK_CLOSE_AFTER_SEARCH/\/** #define LOOK_CLOSE_AFTER_SEARCH **\//" \
  648. XX    >> $SED1
  649. XXfi
  650.  
  651. XXanswer="yes"
  652. XXecho " "
  653. XXecho $nflag "Is the preferred address notation 'user@host' [yes] ?" $cflag
  654. XXread answer
  655.  
  656. XXif [ "$answer" != "y" -a "$answer" != "yes" -a  "$answer" != "" ]
  657. XXthen
  658. XX    echo \
  659. XX "s/#define INTERNET_ADDRESS_FORMAT/\/** #define INTERNET_ADDRESS_FORMAT **\//" \
  660. XX    >> $SED1
  661. XXfi
  662.  
  663. XXecho " "
  664. XXanswer="yes"
  665. XXecho $nflag "Am I going to be running as a setgid program [yes] ? "$cflag
  666. XXread answer
  667.  
  668. XXif [ "$answer" != "y" -a "$answer" != "yes" -a "$answer" != "" ]
  669. XXthen
  670. XX  echo answer is currently equal to \"$answer\"
  671. XX  echo \
  672. XX "s/#define SAVE_GROUP_MAILBOX_ID/\/** #define SAVE_GROUP_MAILBOX_ID **\//" \
  673. XX    >> $SED1
  674. XXfi
  675. XX    
  676. XXcat << THE_END
  677.  
  678.  
  679. XXFor any of the questions after this point, you can press RETURN if the 
  680. XXquestions doesn't apply, or there's no reasonable answer...
  681.  
  682. XXTHE_END
  683.  
  684. XXif [ ! -f /usr/lib/nmail.paths ] 
  685. XXthen
  686. XX  echo $nflag "Where does the output of pathalias live ? " $cflag
  687. XX  read answer
  688.  
  689. XX  if [ "$answer" != "" ]
  690. XX  then
  691. XX    echo "s^/usr/lib/nmail.paths^$answer^" >> $SED1
  692. XX  fi
  693. XXfi
  694. XX 
  695. XXif [ ! -f /usr/lib/domains ] 
  696. XXthen
  697. XX  echo $nflag "Where does the 'domains' file live ? " $cflag
  698. XX  read answer
  699.  
  700. XX  if [ "$answer" != "" ]
  701. XX  then
  702. XX    echo "s^/usr/lib/domains^$answer^" >> $SED1
  703. XX  fi
  704. XXfi
  705.  
  706. XXif [ ! -f /usr/lib/uucp/L.sys ]
  707. XXthen
  708. XX  echo $nflag "Where does the 'L.sys' file live ? " $cflag
  709. XX  read answer
  710.  
  711. XX  if [ "$answer" != "" ]
  712. XX  then
  713. XX    echo "s^/usr/lib/uucp/L.sys^$answer^" >> $SED1
  714. XX  fi
  715. XXfi
  716. XX 
  717. XXif [ ! -d /tmp ]
  718. XXthen 
  719. XX  echo $nflag "/tmp isn't a directory!  What should I use?? " $cflag
  720. XX  read answer
  721.  
  722. XX  if [ "$answer" != "" ]
  723. XX  then
  724. XX    echo "s^/tmp^$answer^" >> $SED1
  725. XX  fi
  726. XXfi
  727.  
  728. XXif [ ! -f /usr/ucb/vi -a "$os_name" = "BSD" ]
  729. XXthen
  730. XX  echo $nflag "I can't find the 'vi' editor!  Where is it? " $cflag
  731. XX  read answer
  732.  
  733. XX  if [ "$answer" != "" ]
  734. XX  then
  735. XX    echo "s^/usr/ucb/vi^$answer^" >> $SED1
  736. XX  fi
  737. XXelif [ ! -f /usr/bin/vi -a "$os_name" = "" ]
  738. XXthen
  739. XX  echo $nflag \
  740. XX    "I can't find the 'vi' editor!  Where is it? " $cflag
  741. XX  read answer
  742.  
  743. XX  if [ "$answer" != "" ]
  744. XX  then
  745. XX    echo "s^/usr/bin/vi^$answer^" >> $SED1
  746. XX  fi
  747. XXfi
  748.  
  749. XXif [ ! -d /usr/spool/mail -a "$os_name" = "BSD" ]
  750. XXthen
  751. XX  echo $nflag "I can't find your inbound mail directory!  Where is it? " $cflag
  752. XX  read answer
  753.  
  754. XX  if [ "$answer" != "" ]
  755. XX  then
  756. XX    echo "s^/usr/spool/mail^$answer^" >> $SED1
  757. XX  fi
  758. XXelif [ ! -d /usr/mail -a "$os_name" = "" ]
  759. XXthen
  760. XX  echo $nflag "I can't find your inbound mail directory!  Where is it? " $cflag
  761. XX  read answer
  762.  
  763. XX  if [ "$answer" != "" ]
  764. XX  then
  765. XX    echo "s^/usr/mail^$answer^" >> $SED1
  766. XX  fi
  767. XXfi
  768.  
  769. XXif [ ! -f /bin/rm ]
  770. XXthen
  771. XX  echo $nflag "Where's the 'rm' program? " $cflag
  772. XX  read answer
  773.  
  774. XX  if [ "$answer" != "" ]
  775. XX  then
  776. XX    echo "s^/bin/rm^$answer^" >> $SED1
  777. XX  fi
  778. XXfi
  779.  
  780. XXif [ ! -f /bin/cat ]
  781. XXthen
  782. XX  echo $nflag "Where's the 'cat' program? " $cflag
  783. XX  read answer
  784.  
  785. XX  if [ "$answer" != "" ]
  786. XX  then
  787. XX    echo "s^/bin/rm^$answer^" >> $SED1
  788. XX  fi
  789. XXfi
  790. XX 
  791. XXif [ ! -f /dev/rct ]
  792. XXthen
  793. XX  if [ ! -f /dev/rmt ]
  794. XX  then
  795. XX    echo $nflag "What's the name of your remote-tape unit? " $cflag
  796. XX    read answer
  797.  
  798. XX    if [ "$answer" = "" ]
  799. XX    then
  800. XX      echo "s^>tapeunit<^unknown-remote-tape-unit^" >> $SED2
  801. XX    else
  802. XX      if [ ! -f $answer ] 
  803. XX      then
  804. XX    if [ -f /dev/$answer ]
  805. XX    then
  806. XX          echo "s^>tapeunit<^/dev/$answer^" >> $SED2
  807. XX        else
  808. XX          echo \
  809. XX           "I can't find either $answer or /dev/$answer.  I'll set it to junk" 
  810. XX          echo "s^>tapeunit<^unknown-remote-tape-unit^" >> $SED2
  811. XX        fi
  812. XX      else
  813. XX        echo "s^>tapeunit<^$answer^" >> $SED2
  814. XX      fi
  815. XX    fi
  816. XX  else
  817. XX    echo "s^>tapeunit<^/dev/rmt^" >> $SED2
  818. XX  fi
  819. XXelse
  820. XX  echo "s^>tapeunit<^/dev/rct^" >> $SED2
  821. XXfi
  822.  
  823. XXif [ ! -d /usr/local/bin ]
  824. XXthen
  825. XX  echo $nflag "Where do you want the system software installed? " $cflag
  826. XX  read answer
  827.  
  828. XX  if [ "$answer" = "" ]
  829. XX  then
  830. XX    echo "s^>dest-dir<^unknown-destination-directory^" >> $SED2
  831. XX  else
  832. XX    if [ -d $answer ]
  833. XX    then
  834. XX      echo "s^>dest-dir<^$answer^" >> $SED2
  835. XX    else
  836. XX      echo "I don't know what you're talking about.  I'll set it to junk" 
  837. XX      echo "s^>dest-dir<^unknown-destination-directory^" >> $SED2
  838. XX    fi
  839. XX  fi
  840. XXelse
  841. XX  echo "s^>dest-dir<^/usr/local/bin^" >> $SED2
  842. XXfi
  843.  
  844. XXif [ ! -f /usr/bin/troff ]
  845. XXthen
  846. XX  if [ ! -f /usr/local/bin/troff ]
  847. XX  then
  848. XX    if [ ! -f /usr/contrib/bin/troff ]
  849. XX    then
  850. XX      if [ ! -f /usr/ucb/troff ]
  851. XX      then
  852. XX        if [ ! -f /bin/troff ]
  853. XX        then
  854. XX          echo $nflag "Where does the 'troff' program live? " $cflag
  855. XX       read answer
  856.  
  857. XX      if [ "$answer" = "" ]
  858. XX      then
  859. XX            echo "s/>troff</nroff/" >> $SED2
  860. XX      else
  861. XX            if [ -f $answer ]
  862. XX        then
  863. XX              echo "s^>troff<^$answer^" >> $SED2
  864. XX              troff=$answer
  865. XX        else
  866. XX          echo "Still can't find it.  I'll set it to \"nroff\" instead."
  867. XX              echo "s/>troff</nroff/" >> $SED2
  868. XX        fi
  869. XX      fi
  870. XX    else
  871. XX          echo "s^>troff<^/bin/troff^" >> $SED2
  872. XX          troff=/bin/troff
  873. XX        fi
  874. XX      else
  875. XX        echo "s^>troff<^/usr/ucb/troff^" >> $SED2
  876. XX        troff=/usr/ucb/troff
  877. XX      fi
  878. XX    else
  879. XX      echo "s^>troff<^/usr/contrib/bin/troff^" >> $SED2
  880. XX      troff=/usr/contribbin/troff
  881. XX    fi
  882. XX  else
  883. XX    echo "s^>troff<^/usr/local/bin/troff^" >> $SED2
  884. XX    troff=/usr/local/bin/troff
  885. XX  fi
  886. XXelse
  887. XX  echo "s^>troff<^/usr/bin/troff^" >> $SED2
  888. XX  troff=/usr/bin/troff
  889. XXfi
  890.  
  891. XX# phew!
  892.  
  893. XXtroffdir=`dirname $troff`
  894.  
  895. XXif [ -f $troffdir/tbl ]
  896. XXthen
  897. XX  echo "s^>tbl<^$troffdir/tbl^" >> $SED2
  898. XXelse
  899. XX  echo $nflag "Where does the 'tbl' program live? " $cflag
  900. XX  read answer
  901.  
  902. XX  if [ "$answer" = "" ]
  903. XX  then
  904. XX    echo "s^>tbl<^cat^" >> $SED2
  905. XX  elif [ -f $answer ]
  906. XX  then
  907. XX    echo "s^>tbl<^$answer^" >> $SED2
  908. XX  else
  909. XX    echo "I can't find that either.  I'll just set it to junk..."
  910. XX    echo "s^>tbl<^cat^" >> $SED2
  911. XX  fi
  912. XXfi
  913.  
  914. XXif [ -f /bin/cc ]
  915. XXthen
  916. XX  echo "s^>cc<^/bin/cc^" >> $SED2
  917. XXelse
  918. XX  echo $nflag "Where does the 'C' compiler live? " $cflag
  919. XX  read answer
  920.  
  921. XX  if [ "$answer" = "" ]
  922. XX  then
  923. XX    cat << THE_END
  924.  
  925. XXI hope you realize that without a "C" compiler there's no point in doing any
  926. XXof this.  If we can't compile anything then this is just so much disk filler.
  927.  
  928. XXIn fact, thinking about it, let's just quit right now.
  929.  
  930. XXTHE_END
  931.  
  932. XX    exit 1
  933. XX  fi
  934.  
  935. XX  if [ -f $answer ]
  936. XX  then
  937. XX    echo "s^>cc<^$answer^" >> $SED2
  938. XX  else
  939. XX    cat << THE_END
  940.  
  941. XXI couldn't find what you specified, pal.  I hope you realize that without a 
  942. XX"C" compiler there's no point in doing any of this.  If we can't compile 
  943. XXanything then this system is just so much disk filler.
  944.  
  945. XXIn fact, thinking about it, let's just quit right now.
  946.  
  947. XXTHE_END
  948. XX    exit 1
  949. XX  fi
  950. XXfi
  951.  
  952. XXecho "s^>rm<^$rm -f^" >> $SED2
  953.  
  954. XXif [ -f /bin/mv ]
  955. XXthen
  956. XX  echo "s^>mv<^/bin/mv -f^" >> $SED2
  957. XXelse
  958. XX  echo "s^>mv<^mv -f^" >> $SED2  
  959. XXfi
  960.  
  961. XXif [ -f /bin/cp ]
  962. XXthen
  963. XX  echo "s^>cp<^/bin/cp^" >> $SED2
  964. XXelse
  965. XX  echo "s^>cp<^cp^" >> $SED2  
  966. XXfi
  967.  
  968. XXcat << END
  969.  
  970. XXThat's it.  Just  have to do some patching up and such...hang loose for a 
  971. XXminute or two, please...
  972.  
  973. XXEND
  974.  
  975. XX# process the three Makefiles accordingly...
  976.  
  977. XXecho "1 - processing the file \"Makefile\"..."
  978. XXcat Makefile.mstr | sed -f $SED2 > Makefile
  979.  
  980. XXecho "2 - processing the file \"src/Makefile\"..."
  981. XXcat src/Makefile.mstr | sed -f $SED2 > src/Makefile
  982.  
  983. XXecho "3 - processing the file \"utils/Makefile\"..."
  984. XXcat utils/Makefile.mstr | sed -f $SED2 > utils/Makefile
  985.  
  986. XX# then filter the sysdefs file through the sed script we've created!
  987.  
  988. XXecho "Finally, processing the file \"hdrs/sysdefs.h\"..."
  989.  
  990. XXif [ -f hdrs/sysdefs.h ]
  991. XXthen
  992. XX  mv hdrs/sysdefs.h hdrs/sysdefs.old
  993. XXfi
  994.  
  995. XXcat hdrs/sysdefs.master | sed -f $SED1 > hdrs/sysdefs.h
  996.  
  997. XXecho Done\!
  998.  
  999. XX$rm -f $SED1 $SED2
  1000. XXexit 0
  1001. XXEND_OF_FILE
  1002.  
  1003. XXchars=`cat Configure.sh | wc -c`
  1004.  
  1005. XXif [ $chars -ne 19263 ]
  1006. XXthen
  1007. XX  echo File damaged in transit...should be 19263 bytes, is $chars instead
  1008. XX  echo  I suggest you check it closely...
  1009. XXfi
  1010.  
  1011. XX#---------------------------------
  1012. XX# File Elm/Makefile.mstr is new!
  1013.  
  1014. XXecho File Elm/Makefile.mstr is new - extracting...
  1015. XXif [ -f Makefile.mstr ]
  1016. XXthen
  1017. XX  echo File \'Makefile.mstr\' is new, but you already have something called that\!
  1018. XX  echo I\'m going to move your file to \'Makefile.mstr.old\'...
  1019. XX  /bin/mv -f Makefile.mstr Makefile.mstr.old
  1020. XXelse
  1021. XX  echo Extracting new file \'Makefile.mstr\'
  1022. XXfi
  1023.  
  1024. XXcat > Makefile.mstr << 'END_OF_FILE'
  1025. XX#
  1026. XX#  Makefile for the entire ELM mail system
  1027. XX#
  1028. XX#         (C) Copyright 1986, Dave Taylor
  1029. XX#
  1030. XX#  Last modification: July 14th, 1986
  1031.  
  1032. XXSHELL=/bin/sh
  1033. XX 
  1034. XX#########################
  1035. XX#
  1036. XX# The following entries need to be customized for the local site:  
  1037. XX#    The first is the address of the data-cassette drive to allow
  1038. XX# easy tape copies to be made, and the second is the final location 
  1039. XX# that all the software should be installed in when 'make install'
  1040. XX# is run.
  1041. XX#
  1042. XX#########################
  1043.  
  1044. XXTAPE=   >tapeunit< 
  1045. XXDEST=   >dest-dir<
  1046.  
  1047. XXLIB=    /usr/local/lib
  1048. XXMAN=    /usr/man/man1
  1049. XXCATMAN= /usr/man/cat1
  1050. XXSHAR=   /usr/local/bin/shar -s 60000
  1051.  
  1052. XX# See the Configuration Guide for further information on this stuff;
  1053. XX#
  1054. XX# if on a Berkeley system:
  1055. XX#   DEFINE = -DBSD
  1056. XX#   LIB2   = -lcurses
  1057. XX# else if on a UTS system:
  1058. XX#   DEFINE = -DUTS
  1059. XX#   LIB2   = -la
  1060. XX# else if on a Sun system:
  1061. XX#   DEFINE = "-DBSD -DSUN"
  1062. XX#   LIB2   = -lcurses
  1063. XX# else if on a Pyramid system:
  1064. XX#   DEFINE = "-DBSD -DNO_VAR_ARGS"
  1065. XX#   LIB2   = -lcurses
  1066. XX# otherwise;
  1067.  
  1068. XX    DEFINE = >os-define<
  1069. XX    LIB2   = >lib2<
  1070.  
  1071. XX# If you're on ACSnet (Australia) you'll want to define
  1072. XX# the following;
  1073.  
  1074. XX#   DEFINE="${DEFINE} -DACSNET"
  1075.  
  1076. XX#########################
  1077.  
  1078. XXLIBS=   -ltermcap
  1079. XXCFLAGS= -O
  1080. XXCC=    >cc<
  1081. XXRM=    >rm<
  1082. XXMV=     >mv<
  1083. XXCP=    >cp<
  1084.  
  1085. XX# if you want to use "nroff", change this...
  1086.  
  1087. XXFORMATTER = >troff<
  1088. XXTBL       = >tbl<
  1089.  
  1090. XXDOCS=   Config.guide Users.guide Ref.guide Alias.guide elm.1 from.1 \
  1091. XX    printmail.1 newalias.1 newmail.1 answer.1 messages.1 \
  1092. XX    grabalias.1 fastmail.1 readmsg.1 autoreply.1 wnewmail.1 \
  1093. XX    trim-headers.1
  1094.  
  1095. XXUTILSRC= utils/answer.c utils/arepdaemon.c utils/autoreply.c           \
  1096. XX    utils/fastmail.c utils/from.c utils/newalias.c \
  1097. XX    utils/newmail.c utils/printmail.c utils/readmsg.c utils/wnewmail.c \
  1098. XX    utils/trim-headers
  1099.  
  1100. XXELMSRC=    src/addr_utils.c src/alias.c src/aliasdb.c src/aliaslib.c     \
  1101. XX    src/args.c src/bounceback.c src/connect_to.c src/curses.c     \
  1102. XX    src/date.c src/delete.c src/domains.c src/edit.c src/encode.c \
  1103. XX    src/errno.c src/file.c src/file_utils.c src/fileio.c src/hdrconfg.c \
  1104. XX    src/help.c src/initialize.c src/input_utils.c src/leavembox.c \
  1105. XX    src/mailmsg1.c src/mailmsg2.c src/mailtime.c src/mkhdrs.c     \
  1106. XX    src/elm.c src/newmbox.c src/notesfile.c src/opt_utils.c       \
  1107. XX    src/output_utils.c src/pattern.c src/quit.c src/read_rc.c     \
  1108. XX    src/remail.c src/reply.c src/return_addr.c src/savecopy.c     \
  1109. XX    src/screen.c src/showmsg.c src/signals.c src/softkeys.c       \
  1110. XX    src/strings.c src/syscall.c src/utils.c src/validname.c       \
  1111. XX    src/calendar.c src/sort.c src/getopt.c src/string2.c          \
  1112. XX    src/builtin.c
  1113.  
  1114. XX################
  1115.  
  1116. XXall:    bin/elm utils 
  1117. XX    @echo Everything is up to date!
  1118.  
  1119. XXdocumentation:  doc/Users.fmtd doc/Ref.fmtd doc/Config.fmtd  doc/Alias.fmtd
  1120. XX    
  1121. XXdoc/Users.fmtd: doc/Users.guide
  1122. XX    ${TBL} doc/Users.guide | ${FORMATTER} -mm > doc/Users.fmtd
  1123.  
  1124. XXdoc/Ref.fmtd: doc/Ref.guide
  1125. XX    ${FORMATTER} -mm doc/Ref.guide > doc/Ref.fmtd
  1126.  
  1127. XXdoc/Config.fmtd:  doc/Config.guide
  1128. XX    ${TBL} doc/Config.guide | ${FORMATTER} -mm > doc/Config.fmtd
  1129.  
  1130. XXdoc/Alias.fmtd:  doc/Alias.guide
  1131. XX    ${FORMATTER} -mm doc/Alias.guide > doc/Alias.fmtd
  1132.  
  1133. XXbin/elm: ${ELMSRC}
  1134. XX    cd src;make DEFINE=${DEFINE} LIB2=${LIB2} ../bin/elm; cd ..
  1135. XX    
  1136. XXbin/utils: ${UTILSRC}
  1137. XX    cd utils; make DEFINE=${DEFINE} LIBS=${LIB2} all; cd ..
  1138. XX    @touch bin/utils
  1139.  
  1140. XXinstall: all
  1141. XX    ${CP} bin/elm          ${DEST}/elm
  1142. XX    ${CP} bin/from         ${DEST}/from
  1143. XX    ${CP} bin/newalias     ${DEST}/newalias
  1144. XX    ${CP} bin/printmail    ${DEST}/printmail
  1145. XX    ${CP} bin/fastmail     ${DEST}/fastmail
  1146. XX    ${CP} bin/readmsg      ${DEST}/readmsg
  1147. XX    ${CP} bin/newmail      ${DEST}/newmail
  1148. XX    ${CP} bin/wnewmail     ${DEST}/wnewmail
  1149. XX    ${CP} bin/checkalias   ${DEST}/checkalias
  1150. XX    ${CP} bin/messages     ${DEST}/messages
  1151. XX    ${CP} bin/trim-headers ${DEST}/trim-headers
  1152. XX    ${CP} bin/arepdaemon   ${DEST}/arepdaemon
  1153. XX    ${CP} bin/autoreply    ${DEST}/autoreply
  1154. XX    ${RM} ${CATMAN}/elm.1 ${CATMAN}/from.1 \
  1155. XX          ${CATMAN}/newalias.1 ${CATMAN}/printmail.1 \
  1156. XX          ${CATMAN}/fastmail.1 ${CATMAN}/elm.1 \
  1157. XX          ${CATMAN}/readmsg.1 ${CATMAN}/answer.1 \
  1158. XX          ${CATMAN}/newmail.1 ${CATMAN}/checkalias.1 \
  1159. XX          ${CATMAN}/autoreply.1 ${CATMAN}/wnewmail.1 \
  1160. XX          ${CATMAN}/messages.1 ${CATMAN}/trim-headers.1
  1161. XX    ${CP} doc/elm.1        ${MAN}/elm.1
  1162. XX    ${CP} doc/from.1       ${MAN}/from.1
  1163. XX    ${CP} doc/newalias.1   ${MAN}/newalias.1
  1164. XX    ${CP} doc/printmail.1  ${MAN}/printmail.1
  1165. XX    ${CP} doc/fastmail.1   ${MAN}/fastmail.1
  1166. XX    ${CP} doc/checkalias.1 ${MAN}/checkalias.1
  1167. XX    ${CP} doc/messages.1   ${MAN}/messages.1
  1168. XX    ${CP} doc/trim-headers.1 ${MAN}/trim-headers.1
  1169. XX    ${CP} doc/autoreply.1  ${MAN}/autoreply.1
  1170. XX    ${CP} doc/answer.1     ${MAN}/answer.1
  1171. XX    ${CP} doc/readmsg.1    ${MAN}/readmsg.1
  1172. XX    ${CP} doc/newmail.1    ${MAN}/newmail.1
  1173. XX    ${CP} doc/wnewmail.1   ${MAN}/wnewmail.1
  1174. XX    ${CP} doc/helpfile     ${LIB}/elm-help.main
  1175. XX    chmod a+rx ${DEST}/from ${DEST}/newalias \
  1176. XX           ${DEST}/printmail ${DEST}/fastmail \
  1177. XX           ${DEST}/readmsg ${DEST}/trim-headers \
  1178. XX           ${DEST}/checkalias ${DEST}/autoreply \
  1179. XX           ${DEST}/newmail ${DEST}/wnewmail ${DEST}/messages
  1180. XX    chgrp mail ${DEST}/elm
  1181. XX    chmod 2755 ${DEST}/elm
  1182. XX    @echo Done with installation.
  1183.  
  1184. XXrmt-install: remote-defined
  1185. XX    @echo " "
  1186. XX    @echo Warning: This assumes "install" has been done on the
  1187. XX    @echo "         remote machine.  If this is not the case you"
  1188. XX    @echo "         better hit BREAK quickly!"
  1189. XX    @echo " "
  1190. XX    ${CP} ${REMOTE}${DEST}/elm          ${DEST}/elm
  1191. XX    ${CP} ${REMOTE}${DEST}/from         ${DEST}/from
  1192. XX    ${CP} ${REMOTE}${DEST}/newalias     ${DEST}/newalias
  1193. XX    ${CP} ${REMOTE}${DEST}/printmail    ${DEST}/printmail
  1194. XX    ${CP} ${REMOTE}${DEST}/fastmail     ${DEST}/fastmail
  1195. XX    ${CP} ${REMOTE}${DEST}/readmsg      ${DEST}/readmsg
  1196. XX    ${CP} ${REMOTE}${DEST}/wnewmail     ${DEST}/wnewmail
  1197. XX    ${CP} ${REMOTE}${DEST}/newmail      ${DEST}/newmail
  1198. XX    ${CP} ${REMOTE}${DEST}/checkalias   ${DEST}/checkalias
  1199. XX    ${CP} ${REMOTE}${DEST}/messages     ${DEST}/messages
  1200. XX    ${CP} ${REMOTE}${DEST}/arepdaemon   ${DEST}/arepdaemon
  1201. XX    ${CP} ${REMOTE}${DEST}/autoreply    ${DEST}/autoreply
  1202. XX    ${RM} ${CATMAN}/elm.1 \
  1203. XX          ${CATMAN}/from.1 \
  1204. XX              ${CATMAN}/newalias.1 \
  1205. XX          ${CATMAN}/printmail.1 \
  1206. XX          ${CATMAN}/fastmail.1 \
  1207. XX              ${CATMAN}/checkalias.1 \
  1208. XX              ${CATMAN}/autoreply.1 \
  1209. XX          ${CATMAN}/readmsg.1 \
  1210. XX          ${CATMAN}/answer.1 \
  1211. XX          ${CATMAN}/newmail.1 \
  1212. XX          ${CATMAN}/wnewmail.1 \
  1213. XX              ${CATMAN}/elm.1
  1214. XX    ${CP} ${REMOTE}${MAN}/elm.1        ${MAN}/elm.1
  1215. XX    ${CP} ${REMOTE}${MAN}/from.1       ${MAN}/from.1
  1216. XX    ${CP} ${REMOTE}${MAN}/newalias.1   ${MAN}/newalias.1
  1217. XX    ${CP} ${REMOTE}${MAN}/printmail.1  ${MAN}/printmail.1
  1218. XX    ${CP} ${REMOTE}${MAN}/fastmail.1   ${MAN}/fastmail.1
  1219. XX    ${CP} ${REMOTE}${MAN}/checkalias.1 ${MAN}/checkalias.1
  1220. XX    ${CP} ${REMOTE}${MAN}/autoreply.1  ${MAN}/autoreply.1
  1221. XX    ${CP} ${REMOTE}${MAN}/readmsg.1    ${MAN}/readmsg.1
  1222. XX    ${CP} ${REMOTE}${MAN}/answer.1     ${MAN}/answer.1
  1223. XX    ${CP} ${REMOTE}${MAN}/wnewmail.1   ${MAN}/wnewmail.1
  1224. XX    ${CP} ${REMOTE}${MAN}/newmail.1    ${MAN}/newmail.1
  1225. XX    ${CP} ${REMOTE}${LIB}/elm-help.main ${LIB}/elm-help.main
  1226. XX    chmod a+rx ${DEST}/from ${DEST}/newalias ${DEST}/printmail \
  1227. XX               ${DEST}/fastmail ${DEST}/readmsg \
  1228. XX           ${DEST}/checkalias ${DEST}/autoreply ${DEST}/wnewmail \
  1229. XX           ${DEST}/newmail ${DEST}/messages
  1230. XX    chgrp mail ${DEST}/elm
  1231. XX    chmod 2755 ${DEST}/elm
  1232. XX    @echo everything is installed based on files from ${REMOTE}
  1233.  
  1234. XXsource: 
  1235. XX    tar cvf ${TAPE} bin/makelisting utils/*.c src/*.c doc/* hdrs/* \
  1236. XX    Instructions Makefile UNIQ_SYMS README utils/Makefile src/Makefile \
  1237. XX    test/* utils/*.awk CHANGES Overview
  1238.  
  1239. XX# Note that the production for SHAR assumes a pretty snazzy shar program
  1240. XX# that can break down the output into a number of files as needed...
  1241. XX#   The current threshold is 60,000 bytes per file, for email/netnews
  1242.  
  1243. XXshar:   
  1244. XX    ${SHAR} *
  1245.  
  1246. XXlint:
  1247. XX    lint ${UTILSRC} > lint.out
  1248.  
  1249. XXlisting:
  1250. XX    @echo listing all source files 
  1251. XX    @/bin/echo \\f > LISTING
  1252. XX    @echo adding file 'README'...
  1253. XX    @cat README >> LISTING
  1254. XX    @/bin/echo \\f >> LISTING
  1255. XX    @echo adding file 'Instructions...
  1256. XX    @cat Instructions >> LISTING
  1257. XX    @/bin/echo \\f >> LISTING
  1258. XX    @echo adding file 'Makefile'...
  1259. XX    @cat Makefile >> LISTING
  1260. XX    @bin/makelisting Makefile ${UTILSRC} src/Makefile src/*.c hdrs/*.h
  1261. XX    @echo LISTING generated.
  1262.  
  1263. XXelm-listing: 
  1264. XX    @echo listing just the ELM system source files
  1265. XX    @echo ' ' > src/LISTING
  1266. XX    @cd src ; make listing ; cd ..
  1267. XX    @echo LISTING generated \(in directory /src\).
  1268.  
  1269. XXclean:
  1270. XX    @cd src ; make clean ; cd ..
  1271. XX    @cd utils; make clean ; cd ..
  1272. XX    @echo All spurious files removed
  1273.  
  1274. XXelm: bin/elm
  1275. XXutils: bin/utils
  1276. XXutils/checkalias:
  1277. XXutils/messages:
  1278. XXdoc/Users.guide:
  1279. XXdoc/Ref.guide:
  1280. XXdoc/Alias.guide:
  1281. XXdoc/Config.guide:
  1282.  
  1283. XXremote-defined:
  1284. XX    @if ( "${REMOTE}" == "" ) then; \
  1285. XX       echo " " ; \
  1286. XX       echo "You need to define 'REMOTE' as the remote file system" ; \
  1287. XX       echo "for this particular command.   The easiest way to do " ; \
  1288. XX       echo "this is to type:" ;\
  1289. XX       echo "    make -f <makefile> REMOTE=<remote file system> rmt-install" ; \
  1290. XX       echo " " ; \
  1291. XX     endif
  1292. XX    @if ( "${REMOTE}" == "" ) exit 1
  1293. XXEND_OF_FILE
  1294.  
  1295. XXchars=`cat Makefile.mstr | wc -c`
  1296.  
  1297. XXif [ $chars -ne 8850 ]
  1298. XXthen
  1299. XX  echo File damaged in transit...should be 8850 bytes, is $chars instead
  1300. XX  echo  I suggest you check it closely...
  1301. XXfi
  1302.  
  1303.  
  1304. XXecho done with autodiff, part 2
  1305. XXexit 0
  1306.  
  1307. XX\SHAR_EOF
  1308. @//E*O*F Edit3//
  1309. chmod u=rw,g=rw,o=rw $OUT
  1310.  
  1311. echo Inspecting for damage in transit...
  1312. temp=/tmp/sharin$$; dtemp=/tmp/sharout$$
  1313. trap "rm -f $temp $dtemp; exit" 0 1 2 3 15
  1314. cat > $temp <<\!!!
  1315.     1276    4208   29970 Edit3
  1316. !!!
  1317. wc  Edit3 | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp
  1318. if test -s $dtemp ; then
  1319.     echo "Ouch [diff of wc output]:"
  1320.     cat $dtemp
  1321.     STATUS=1
  1322. elif test $STATUS = 0 ; then
  1323.     echo "No problems found."
  1324. else
  1325.     echo "WARNING -- PROBLEMS WERE FOUND..."
  1326. fi
  1327. exit $STATUS
  1328.